-------------------------------------------------------------------------------
      name:  <unnamed>
       log:  C:\Users\hortalav\Dropbox\Research\_Submitted\RestrictChoice\Restr
> ictChoice (shared)\NewApproach(June2013)\Replication files\replication_table_
> 1.smcl
  log type:  smcl
 opened on:  19 Apr 2016, 09:20:08

. 
. ** IMPORT TEXT DATA CREATED BY MATLAB **
. import delimited results_simulation_RC_bootstrap_A2.txt, delimiter(comma) var
> names(1) case(preserve) clear
(12 vars, 1000000 obs)

. save results_simulation_RC_bootstrap_A2.dta, replace
file results_simulation_RC_bootstrap_A2.dta saved

. import delimited results_simulation_RC_bootstrap_B2.txt, delimiter(comma) var
> names(1) case(preserve) clear
(28 vars, 1000000 obs)

. save results_simulation_RC_bootstrap_B2.dta, replace
file results_simulation_RC_bootstrap_B2.dta saved

. use results_simulation_RC_bootstrap_A2.dta, clear

. merge 1:1 step using results_simulation_RC_bootstrap_B2.dta

    Result                           # of obs.
    -----------------------------------------
    not matched                             0
    matched                         1,000,000  (_merge==3)
    -----------------------------------------

. drop _merge

. save results_simulation_RC_bootstrap_2.dta, replace
file results_simulation_RC_bootstrap_2.dta saved

. 
. ** CREATE AND RENAME VARIABLES **
. use results_simulation_RC_bootstrap_2.dta, clear

. rename cost OLD_cost

. gen cost = round(p*alpha*ln(T1_NR)+(1-p)*alpha*ln(T2_NR)-p*alpha*ln(T1_R)-(1-
> p)*alpha* ln(T2_R),0.000000001)

. gen cost_d = (cost>0)

. replace cost_d =  -1 if cost<0
(279055 real changes made)

. tab cost_d

     cost_d |      Freq.     Percent        Cum.
------------+-----------------------------------
         -1 |    279,055       27.91       27.91
          0 |    554,213       55.42       83.33
          1 |    166,732       16.67      100.00
------------+-----------------------------------
      Total |  1,000,000      100.00

. gen sigma_dif = abs(sigma_1-sigma_2)

. gen mu_dif    = abs(   mu_1-   mu_2)

. gen w_1=mu_1+(sigma_1^2)/2

. gen w_2=mu_2+(sigma_2^2)/2

. gen w_dif = abs(w_1-w_2)

. gen y2 = y^2

. gen no_diff_NR  = (t1_NR==t2_NR)

. gen no_diff_R  = (t1_R==t2_R)

. tab cost_d no_diff_NR

           |      no_diff_NR
    cost_d |         0          1 |     Total
-----------+----------------------+----------
        -1 |   279,055          0 |   279,055 
         0 |         0    554,213 |   554,213 
         1 |   166,732          0 |   166,732 
-----------+----------------------+----------
     Total |   445,787    554,213 | 1,000,000 


. tab no_diff_NR no_diff_R

           |       no_diff_R
no_diff_NR |         0          1 |     Total
-----------+----------------------+----------
         0 |   133,959    311,828 |   445,787 
         1 |         0    554,213 |   554,213 
-----------+----------------------+----------
     Total |   133,959    866,041 | 1,000,000 


. 
. /* In 55% of our observations there is no difference between the policies 
> adopted by the median voter in the two states of the worls (when no restr.). 
> This almost  perfectly coincides with the observations when the costs of rest
> r
> is zero (there are 12 observations in which it is not). */
.  
. 
. ** TABLE 1 **
. sum cost y y2 alpha abst_1 p  mu_1 mu_2 sigma_1 sigma_2 A B w_dif if cost!=0

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
        cost |    445787   -.1191845      .37876  -3.376392   3.463336
           y |    445787    .5009529    .2886652   5.00e-06    .999996
          y2 |    445787    .3342813    .2983952   2.50e-11    .999992
       alpha |    445787    .6056389    .2199777    .000014    .999993
      abst_1 |    445787    .6280014    .3599294          0          1
-------------+--------------------------------------------------------
           p |    445787    .4998344    .2887228   2.00e-06    .999987
        mu_1 |    445787    5.064289    .7620091    4.00001   6.999984
        mu_2 |    445787    5.937222    .7642616   4.000021          7
     sigma_1 |    445787    .6549535    .4071636          0   1.499998
     sigma_2 |    445787    .8555449    .4435903   5.00e-06        1.5
-------------+--------------------------------------------------------
           A |    445787     .746447    .4360519   9.00e-06   1.499995
           B |    445787    .8893961    .3841119    .000047        1.5
       w_dif |    445787    1.174097    .7908221   9.54e-07   4.063451

. corr cost y y2 alpha abst_1 p  mu_1 mu_2 sigma_1 sigma_2 A B w_dif if cost!=0
(obs=445787)

             |     cost        y       y2    alpha   abst_1        p     mu_1  
>    mu_2  sigma_1  sigma_2        A        B    w_dif
-------------+-----------------------------------------------------------------
----------------------------------------------------
        cost |   1.0000
           y |   0.3291   1.0000
          y2 |   0.3408   0.9683   1.0000
       alpha |   0.0020  -0.0017  -0.0017   1.0000
      abst_1 |  -0.1304   0.0568   0.0469  -0.1926   1.0000
           p |  -0.4942   0.0018   0.0010  -0.0020   0.0033   1.0000
        mu_1 |   0.0570  -0.0001   0.0000   0.1140  -0.4243   0.0001   1.0000
        mu_2 |  -0.0572   0.0013   0.0009  -0.1186   0.4259  -0.0001   0.1951  
>  1.0000
     sigma_1 |  -0.0055  -0.0003   0.0001   0.0304  -0.0147   0.0017  -0.0921  
>  0.0914   1.0000
     sigma_2 |   0.0175  -0.0012  -0.0009   0.1590  -0.3194  -0.0002   0.1134  
> -0.1133   0.0263   1.0000
           A |  -0.0953   0.0004   0.0006   0.1415   0.0136  -0.0012  -0.0117  
>  0.0090  -0.0070  -0.0120   1.0000
           B |   0.0651  -0.0017  -0.0017   0.4158   0.0464   0.0002   0.0040  
> -0.0090  -0.0015  -0.1070  -0.0911   1.0000
       w_dif |  -0.0935   0.0028   0.0025  -0.1099   0.4217   0.0004  -0.4298  
>  0.4338  -0.2125   0.2390   0.0118  -0.0664   1.0000


. reg cost  y alpha abst_1 p  mu_1 mu_2 sigma_1 sigma_2 A B if cost!=0

      Source |       SS       df       MS              Number of obs =  445787
-------------+------------------------------           F( 10,445776) =28602.85
       Model |  24995.9084    10  2499.59084           Prob > F      =  0.0000
    Residual |  38956.1797445776  .087389585           R-squared     =  0.3909
-------------+------------------------------           Adj R-squared =  0.3908
       Total |  63952.0881445786  .143459167           Root MSE      =  .29562

------------------------------------------------------------------------------
        cost |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           y |   .4466225   .0015387   290.26   0.000     .4436068    .4496383
       alpha |   -.087082   .0023694   -36.75   0.000     -.091726    -.082438
      abst_1 |  -.1916004   .0017548  -109.19   0.000    -.1950396   -.1881611
           p |  -.6486035   .0015335  -422.95   0.000    -.6516091   -.6455978
        mu_1 |  -.0087415   .0007375   -11.85   0.000     -.010187    -.007296
        mu_2 |   .0085725   .0007361    11.65   0.000     .0071298    .0100152
     sigma_1 |  -.0082207   .0011133    -7.38   0.000    -.0104027   -.0060386
     sigma_2 |  -.0169631   .0010762   -15.76   0.000    -.0190724   -.0148537
           A |  -.0687842   .0010444   -65.86   0.000    -.0708312   -.0667371
           B |   .0849295   .0013188    64.40   0.000     .0823447    .0875143
       _cons |   .1434157   .0048257    29.72   0.000     .1339574    .1528739
------------------------------------------------------------------------------

. outreg using RestrictChoice_Simulation.tex, replace bdec(4) se tex varlabels 
> starlevels(10 5 1) sigsymbols(+,*,**) ctitle("", "(1)") 
(note: file RestrictChoice_Simulation.tex not found)
                           ------------------------
                                          (1)     
                           ------------------------
                             y           0.4466   
                                       (0.0015)** 
                             alpha      -0.0871   
                                       (0.0024)** 
                             abst_1     -0.1916   
                                       (0.0018)** 
                             p          -0.6486   
                                       (0.0015)** 
                             mu_1       -0.0087   
                                       (0.0007)** 
                             mu_2        0.0086   
                                       (0.0007)** 
                             sigma_1    -0.0082   
                                       (0.0011)** 
                             sigma_2    -0.0170   
                                       (0.0011)** 
                             A          -0.0688   
                                       (0.0010)** 
                             B           0.0849   
                                       (0.0013)** 
                            Constant     0.1434   
                                       (0.0048)** 
                            R2            0.39    
                            N           445,787   
                           ------------------------
                         + p<0.1; * p<0.05; ** p<0.01


. reg cost y y2 alpha abst_1 p  mu_1 mu_2 sigma_1 sigma_2 A B  if cost!=0

      Source |       SS       df       MS              Number of obs =  445787
-------------+------------------------------           F( 11,445775) =26734.43
       Model |  25419.8189    11  2310.89263           Prob > F      =  0.0000
    Residual |  38532.2692445775   .08643883           R-squared     =  0.3975
-------------+------------------------------           Adj R-squared =  0.3975
       Total |  63952.0881445786  .143459167           Root MSE      =    .294

------------------------------------------------------------------------------
        cost |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           y |   .0317932   .0061181     5.20   0.000      .019802    .0437845
          y2 |   .4140666   .0059127    70.03   0.000     .4024779    .4256554
       alpha |  -.0862844   .0023565   -36.62   0.000    -.0909031   -.0816657
      abst_1 |  -.1861728   .0017469  -106.57   0.000    -.1895967    -.182749
           p |  -.6482758   .0015252  -425.05   0.000    -.6512651   -.6452865
        mu_1 |   -.007499   .0007337   -10.22   0.000     -.008937    -.006061
        mu_2 |   .0073553   .0007323    10.04   0.000       .00592    .0087905
     sigma_1 |  -.0078929   .0011072    -7.13   0.000    -.0100631   -.0057228
     sigma_2 |  -.0162284   .0010704   -15.16   0.000    -.0183263   -.0141304
           A |  -.0689432   .0010387   -66.37   0.000    -.0709791   -.0669074
           B |   .0845708   .0013116    64.48   0.000         .082    .0871416
       _cons |   .2092849   .0048907    42.79   0.000     .1996992    .2188705
------------------------------------------------------------------------------

. outreg using RestrictChoice_Simulation.tex, merge bdec(4) se tex varlabels st
> arlevels(10 5 1) sigsymbols(+,*,**) ctitle("", "(2)") 

                     ------------------------------------
                                    (1)         (2)     
                     ------------------------------------
                       y           0.4466      0.0318   
                                 (0.0015)**  (0.0061)** 
                       alpha      -0.0871     -0.0863   
                                 (0.0024)**  (0.0024)** 
                       abst_1     -0.1916     -0.1862   
                                 (0.0018)**  (0.0017)** 
                       p          -0.6486     -0.6483   
                                 (0.0015)**  (0.0015)** 
                       mu_1       -0.0087     -0.0075   
                                 (0.0007)**  (0.0007)** 
                       mu_2        0.0086      0.0074   
                                 (0.0007)**  (0.0007)** 
                       sigma_1    -0.0082     -0.0079   
                                 (0.0011)**  (0.0011)** 
                       sigma_2    -0.0170     -0.0162   
                                 (0.0011)**  (0.0011)** 
                       A          -0.0688     -0.0689   
                                 (0.0010)**  (0.0010)** 
                       B           0.0849      0.0846   
                                 (0.0013)**  (0.0013)** 
                      y2                       0.4141   
                                             (0.0059)** 
                      Constant     0.1434      0.2093   
                                 (0.0048)**  (0.0049)** 
                      R2            0.39        0.40    
                      N           445,787     445,787   
                     ------------------------------------
                         + p<0.1; * p<0.05; ** p<0.01


. reg cost y y2 alpha abst_1 p  mu_1 mu_2 sigma_1 sigma_2 A B w_dif if cost!=0

      Source |       SS       df       MS              Number of obs =  445787
-------------+------------------------------           F( 12,445774) =24797.67
       Model |  25600.9356    12   2133.4113           Prob > F      =  0.0000
    Residual |  38351.1525445774  .086032726           R-squared     =  0.4003
-------------+------------------------------           Adj R-squared =  0.4003
       Total |  63952.0881445786  .143459167           Root MSE      =  .29331

------------------------------------------------------------------------------
        cost |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
           y |   .0316625   .0061037     5.19   0.000     .0196995    .0436256
          y2 |   .4144024   .0058988    70.25   0.000     .4028409    .4259639
       alpha |   -.087941   .0023513   -37.40   0.000    -.0925494   -.0833326
      abst_1 |  -.1849641    .001743  -106.12   0.000    -.1883803   -.1815479
           p |  -.6481276   .0015216  -425.95   0.000    -.6511099   -.6451454
        mu_1 |  -.0379991   .0009888   -38.43   0.000    -.0399371   -.0360612
        mu_2 |   .0379127   .0009886    38.35   0.000     .0359752    .0398502
     sigma_1 |  -.0388359   .0012942   -30.01   0.000    -.0413725   -.0362993
     sigma_2 |   .0169127   .0012892    13.12   0.000     .0143858    .0194395
           A |  -.0688337   .0010363   -66.42   0.000    -.0708648   -.0668026
           B |   .0832971   .0013088    63.64   0.000     .0807318    .0858624
       w_dif |  -.0473235   .0010314   -45.88   0.000     -.049345    -.045302
       _cons |   .2309694    .004902    47.12   0.000     .2213616    .2405772
------------------------------------------------------------------------------

. outreg using RestrictChoice_Simulation.tex, merge bdec(4) se tex varlabels st
> arlevels(10 5 1) sigsymbols(+,*,**) ctitle("", "(3)") 

               ------------------------------------------------
                              (1)         (2)         (3)     
               ------------------------------------------------
                 y           0.4466      0.0318      0.0317   
                           (0.0015)**  (0.0061)**  (0.0061)** 
                 alpha      -0.0871     -0.0863     -0.0879   
                           (0.0024)**  (0.0024)**  (0.0024)** 
                 abst_1     -0.1916     -0.1862     -0.1850   
                           (0.0018)**  (0.0017)**  (0.0017)** 
                 p          -0.6486     -0.6483     -0.6481   
                           (0.0015)**  (0.0015)**  (0.0015)** 
                 mu_1       -0.0087     -0.0075     -0.0380   
                           (0.0007)**  (0.0007)**  (0.0010)** 
                 mu_2        0.0086      0.0074      0.0379   
                           (0.0007)**  (0.0007)**  (0.0010)** 
                 sigma_1    -0.0082     -0.0079     -0.0388   
                           (0.0011)**  (0.0011)**  (0.0013)** 
                 sigma_2    -0.0170     -0.0162      0.0169   
                           (0.0011)**  (0.0011)**  (0.0013)** 
                 A          -0.0688     -0.0689     -0.0688   
                           (0.0010)**  (0.0010)**  (0.0010)** 
                 B           0.0849      0.0846      0.0833   
                           (0.0013)**  (0.0013)**  (0.0013)** 
                y2                       0.4141      0.4144   
                                       (0.0059)**  (0.0059)** 
                w_dif                               -0.0473   
                                                   (0.0010)** 
                Constant     0.1434      0.2093      0.2310   
                           (0.0048)**  (0.0049)**  (0.0049)** 
                R2            0.39        0.40        0.40    
                N           445,787     445,787     445,787   
               ------------------------------------------------
                         + p<0.1; * p<0.05; ** p<0.01


. 
. log close
      name:  <unnamed>
       log:  C:\Users\hortalav\Dropbox\Research\_Submitted\RestrictChoice\Restr
> ictChoice (shared)\NewApproach(June2013)\Replication files\replication_table_
> 1.smcl
  log type:  smcl
 closed on:  19 Apr 2016, 09:21:10
-------------------------------------------------------------------------------
